package com.gitee.l0km.beanfilter.annotations;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import com.gitee.l0km.beanfilter.core.Activation;
import com.gitee.l0km.beanfilter.core.CodecPhase;
import com.gitee.l0km.beanfilter.core.CodecScope;
import com.gitee.l0km.beanfilter.core.FlexibleContextFilter;
import com.gitee.l0km.casban.ctor.annotations.CtorArg;
import com.gitee.l0km.common.spring.core.annotation.AliasFor;

/**
 * 基于{@link FlexibleContextFilter}的字段过滤器注解，可以作为元注解，也可以直接定义在服务方法上<br>
 * 字段说明参见 {@link FlexibleContextFilter#FlexibleContextFilter(Class, boolean, boolean, String[], Class[], String[], boolean) }
 * 和{@link FilterMeta}同名字段
 * @author guyadong
 *
 */
@Retention(RUNTIME)
@Target({ ANNOTATION_TYPE,METHOD })
@FieldFilter(filterClass = FlexibleContextFilter.class,phase = CodecPhase.BOTH,scope=CodecScope.ALL)
@Repeatable(MultisceneNameFilters.class)
public @interface MultisceneNameFilter {
	@CtorArg(0)
	@AliasFor(annotation = FilterMeta.class,attribute = "beanClass")
	Class<?> beanClass() default Object.class;
	@CtorArg(1)
	boolean autoCase() default false;
	@CtorArg(2)
	boolean whiteList() default false;
	@CtorArg(3)
	String[] filterNames();
	@CtorArg(4)
	Class<? extends Activation>[]  activeOn() default {};
	@CtorArg(5)
	String[]  activeOnClassNames() default {};
	@CtorArg(6)
	boolean  activeAnd() default true;
}
